package com.kaikeba.bean;

import java.sql.Timestamp;
import java.util.List;
import java.util.Objects;

public class Courier {
    private int id;
    private String number;
    private String username;
    private String userPhone;
    private String password;
    private Timestamp loginTime;
    private Timestamp inTime;
    private int status;
    private List<Express> expressList;

    public Courier(int id, String number, String username, String userPhone, String password, Timestamp loginTime, Timestamp inTime, int status) {
        this.id = id;
        this.number = number;
        this.username = username;
        this.userPhone = userPhone;
        this.password = password;
        this.loginTime = loginTime;
        this.inTime = inTime;
        this.status = status;
    }

    public Courier(String number, String username, String userPhone, String password) {
        this.number=number;
        this.username=username;
        this.userPhone=userPhone;
        this.password=password;
    }

    @Override
    public String toString() {
        return "EConsole{" +
                "id=" + id +
                ", number='" + number + '\'' +
                ", username='" + username + '\'' +
                ", userPhone='" + userPhone + '\'' +
                ", password='" + password + '\'' +
                ", loginTime=" + loginTime +
                ", inTime=" + inTime +
                ", status=" + status +
                ", expressList=" + expressList +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return id == courier.id &&
                status == courier.status &&
                Objects.equals(number, courier.number) &&
                Objects.equals(username, courier.username) &&
                Objects.equals(userPhone, courier.userPhone) &&
                Objects.equals(password, courier.password) &&
                Objects.equals(loginTime, courier.loginTime) &&
                Objects.equals(inTime, courier.inTime) &&
                Objects.equals(expressList, courier.expressList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, number, username, userPhone, password, loginTime, inTime, status, expressList);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Timestamp getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }

    public Timestamp getInTime() {
        return inTime;
    }

    public void setInTime(Timestamp inTime) {
        this.inTime = inTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<Express> getExpressList() {
        return expressList;
    }

    public void setExpressList(List<Express> expressList) {
        this.expressList = expressList;
    }

    public Courier() {
    }

    public Courier(int id, String number, String username, String userPhone, String password, Timestamp loginTime, Timestamp inTime, int status, List<Express> expressList) {
        this.id = id;
        this.number = number;
        this.username = username;
        this.userPhone = userPhone;
        this.password = password;
        this.loginTime = loginTime;
        this.inTime = inTime;
        this.status = status;
        this.expressList = expressList;
    }
}
